﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="AddSparePart.aspx.cs" Inherits="WXYW.AddSparePart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    新增备件
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <table width="100%" cellpadding="0px" cellspacing="0px" border="0px" style="line-height:30px">
        <tr>
            <td></td>
            <td colspan="5" style="color:Red">
                请按照提示填写备件产品的相关信息，注意带*的为必填项。
            </td>
        </tr>
        <tr>
            <td style="width:15%">
            </td>
            <td style="width:15%">
                管理员：
            </td>
            <td style="width:25%">
                <asp:Label ID="managerLbl" runat="server"></asp:Label>
            </td>
            <td style="color:Red; width:5%">
            </td>
            <td style="width:30%">
            </td>
            <td style="width:10%">
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                增加日期：
            </td>
            <td>
                <%= DateTime.Now.ToString("yyyy-MM-dd") %>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                物料号：
            </td>
            <td>
                <asp:TextBox ID="wlTxtBox" runat="server" ValidationGroup="newSparePartValidation" Width="90%"></asp:TextBox>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                产品分类：
            </td>
            <td>
                <asp:DropDownList ID="productTypeDropdownList" runat="server" AutoPostBack="false" Width="90%"
                    AppendDataBoundItems="True" DataTextField="ProductTypeName" DataValueField="ProductTypeID">
                </asp:DropDownList>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                产品型号：
            </td>
            <td>
                <asp:TextBox ID="modelNOTxtBox" runat="server" ValidationGroup="newSparePartValidation" Width="90%"></asp:TextBox>
            </td>
            <td style="color:Red">*
            </td>
            <td>
                <asp:RequiredFieldValidator ID="modelNOValidator" runat="server" ErrorMessage=""
                    Text="请输入产品型号" ControlToValidate="modelNOTxtBox" ValidationGroup="newSparePartValidation"></asp:RequiredFieldValidator>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                版本号：
            </td>
            <td>
                <asp:TextBox ID="versionNOTxtBox" runat="server" ValidationGroup="newSparePartValidation" Width="90%"></asp:TextBox>
            </td>
            <td style="color:Red;">*
            </td>
            <td>
                <asp:RequiredFieldValidator ID="versionNOValidator" runat="server" ErrorMessage=""
                    Text="请输入产品版本号" ControlToValidate="versionNOTxtBox" ValidationGroup="newSparePartValidation"></asp:RequiredFieldValidator>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                增加数量：
            </td>
            <td>
                <asp:TextBox ID="countTxtBox" runat="server" ValidationGroup="newSparePartValidation" Width="50%"></asp:TextBox>
            </td>
            <td style="color:Red;">*
            </td>
            <td>
                <asp:RequiredFieldValidator ID="countValidator1" runat="server" ErrorMessage="" Display="Dynamic"
                    Text="请输入合法的数量" ControlToValidate="countTxtBox" ValidationGroup="newSparePartValidation"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="countValidator2" runat="server" ErrorMessage="" Display="Dynamic"
                    Text="请输入合法的数量" ValidationExpression="^[0-9]+$" ControlToValidate="countTxtBox" ValidationGroup="newSparePartValidation"></asp:RegularExpressionValidator>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                市场价格(元)：
            </td>
            <td>
                <asp:TextBox ID="marketPriceTxtBox" runat="server" ValidationGroup="newSparePartValidation" Width="50%"></asp:TextBox>
            </td>
            <td style="color:Red; ">
            </td>
            <td>
               <asp:RegularExpressionValidator ID="marketPriceValidator2" runat="server" ErrorMessage="请输入合法的市场价格"
                    Text="请输入合法的市场价格" ValidationExpression="^\-?[0-9]*\.?[0-9]*$" ControlToValidate="marketPriceTxtBox"
                    ValidationGroup="newSparePartValidation"></asp:RegularExpressionValidator>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                备件价格（元）：
            </td>
            <td>
                <asp:TextBox ID="sparePartPriceTxtBox" runat="server" ValidationGroup="newSparePartValidation" Width="50%"></asp:TextBox>
            </td>
            <td style="color:Red;">
            </td>
            <td>
                <asp:RegularExpressionValidator ID="sparePartPriceValidator2" runat="server" ErrorMessage="请输入合法的备件价格"
                    Text="请输入合法的备件价格" ValidationExpression="^\-?[0-9]*\.?[0-9]*$" ControlToValidate="sparePartPriceTxtBox"
                    ValidationGroup="newSparePartValidation"></asp:RegularExpressionValidator>
            </td>
            <td></td>
        </tr>
        <tr>
            <td></td>
            <td>
                库存类型：
            </td>
            <td>
                <asp:DropDownList ID="storageTypeDropdownList" runat="server" Width="50%">
                    <asp:ListItem Text="5148" Value="5148"></asp:ListItem>
                    <asp:ListItem Text="零价" Value="零价"></asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                产品状态：
            </td>
            <td>
                <asp:DropDownList ID="productStatusDropdownList" runat="server" Width="50%">
                    <asp:ListItem Text="良品" Value="良品"></asp:ListItem>
                    <asp:ListItem Text="不良品" Value="不良品"></asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                入库地：
            </td>
            <td>
                <asp:DropDownList ID="enterServiceStationDropDownList" runat="server" Width="50%"
                    DataTextField="Name" DataValueField="ID">
                </asp:DropDownList>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>库位：</td>
            <td><asp:TextBox ID="kwTxtBox" runat="server" Width="90%"></asp:TextBox></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td></td>
            <td>入库单号：</td>
            <td><asp:TextBox ID="rkNOTxtBox" runat="server" Width="90%"></asp:TextBox></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td></td>
            <td>入库备注：</td>
            <td><asp:TextBox ID="rkComment" runat="server" Width="90%" TextMode="MultiLine" Rows="4"></asp:TextBox></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td colspan="6" style="text-align: center">
                <asp:Button ID="saveNewBtn" runat="server" Text="保存新增" ValidationGroup="newSparePartValidation"
                    OnClick="saveNewBtn_Click" />
            </td>
        </tr>
        <tr>
            <td></td>
            <td colspan="5">
                <asp:Label ID="messageLbl" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>
    </table>
</asp:Content>
